package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.RnxSmsSendLog;
import com.ruoyi.system.mapper.RnxSmsSendLogMapper;
import com.ruoyi.system.service.IRnxSmsSendLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 短信下发记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-12
 */
@Service
public class RnxSmsSendLogServiceImpl implements IRnxSmsSendLogService 
{
    @Resource
    private RnxSmsSendLogMapper rnxSmsSendLogMapper;

    /**
     * 查询短信下发记录
     * 
     * @param id 短信下发记录主键
     * @return 短信下发记录
     */
    @Override
    public RnxSmsSendLog selectRnxSmsSendLogById(Long id)
    {
        return rnxSmsSendLogMapper.selectRnxSmsSendLogById(id);
    }

    /**
     * 查询短信下发记录列表
     * 
     * @param rnxSmsSendLog 短信下发记录
     * @return 短信下发记录
     */
    @Override
    public List<RnxSmsSendLog> selectRnxSmsSendLogList(RnxSmsSendLog rnxSmsSendLog)
    {
        return rnxSmsSendLogMapper.selectRnxSmsSendLogList(rnxSmsSendLog);
    }

    /**
     * 新增短信下发记录
     * 
     * @param rnxSmsSendLog 短信下发记录
     * @return 结果
     */
    @Override
    public int insertRnxSmsSendLog(RnxSmsSendLog rnxSmsSendLog)
    {
        return rnxSmsSendLogMapper.insertRnxSmsSendLog(rnxSmsSendLog);
    }

    /**
     * 修改短信下发记录
     * 
     * @param rnxSmsSendLog 短信下发记录
     * @return 结果
     */
    @Override
    public int updateRnxSmsSendLog(RnxSmsSendLog rnxSmsSendLog)
    {
        return rnxSmsSendLogMapper.updateRnxSmsSendLog(rnxSmsSendLog);
    }

    /**
     * 批量删除短信下发记录
     * 
     * @param ids 需要删除的短信下发记录主键
     * @return 结果
     */
    @Override
    public int deleteRnxSmsSendLogByIds(String ids)
    {
        return rnxSmsSendLogMapper.deleteRnxSmsSendLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除短信下发记录信息
     * 
     * @param id 短信下发记录主键
     * @return 结果
     */
    @Override
    public int deleteRnxSmsSendLogById(Long id)
    {
        return rnxSmsSendLogMapper.deleteRnxSmsSendLogById(id);
    }

	@Override
	public List<RnxSmsSendLog> selectRnxSmsSendLogListByCode(String code, String dayTime) {
		return rnxSmsSendLogMapper.selectRnxSmsSendLogListByCode(code,dayTime);
	}
}
